import cv2
import numpy as np


def img_preprocess(img: np.ndarray,
                   new_width: int,
                   new_height: int) -> np.ndarray:
    """
    图片重新设置宽高

    :param new_height: 高
    :param new_width: 宽
    :param img: 图片矩阵
    :return: 重置后的图片矩阵
    """
    return cv2.resize(img, (new_width, new_height), interpolation=cv2.INTER_AREA)
